package com.hpeu_01.day0107.homework;

public class ClassA implements InterfaceA{
    @Override
    public int method(int n) {
        int sum = 0;
        //计算1到n的和
        for (int i=1;i<n;i++){
            sum+=i;
        }
        return sum;
    }
}
